package com.yuewen.permissioncheck.asm.checker;

/**
 * 大概位置
 *
 * @author zhanglulu
 */
public class LocationServicesPermission extends BasePermission {
  @Override
  boolean check(InvokeParam param) {
    return "getSystemService".equals(param.methodName)
      && "(Ljava/lang/String;)Ljava/lang/Object;".equals(param.methodDesc)
      && param.methodParam instanceof String
      && "location".equals(param.methodParam);//入参是 location
  }

  @Override
  String invokeHookMethodName() {
    return "invokeLocationServices";
  }
}
